import request from '@/utils/request'
const baseURL = "http://127.0.0.1:3006"
// const baseURL = "http://192.168.1.111:3002"
export function policeIndex(params) {
  return request({
    url: '/api/carousel/list',
    method: 'get',
    baseURL
  })
}

// 添加轮播图
export function addCarousel(data) {
  return request({
    url: '/api/carousel/add',
    method: 'post',
    baseURL,
    data
  })
}

// 更新轮播图
export function updateCarousel(data) {
  return request({
    url: '/api/carousel/update',
    method: 'post',
    baseURL,
    data
  })
}

// 删除轮播图
export function delCarousel(data) {
  return request({
    url: '/api/carousel/del',
    method: 'post',
    baseURL,
    data
  })
}


export function uploadFile(data) {
  return request({
    url: '/api/uploadFile',
    headers: {'Content-Type': 'multipart/form-data'},
    method: 'post',
    baseURL,
    data
  })
}